home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 11 / AMUG BBS in a Box Volume XI (April 1994) (MacWizards).iso / Files / Tele / D-F / DIALSC16.sit / DialScript 1.6 / Examples / AttackDial.ds next >
Encoding:
Text File  |  1991-09-18  |  625 b   |  27 lines  |  [TEXT/dIsR]

  1. script AttackDial  -- Dial number on Hayes modem until connect
  2.  
  3.    state Init
  4.       setvar Phone_Number "459-5346";
  5.       next Dial;
  6.    end;
  7.  
  8.    state Dial
  9.       send "\r"; send "AT\r";
  10.       wait "OK";                -- This is bad.  Should have timeout.
  11.  
  12.       -- It would be faster to send "ATDT4595346\r"
  13.       send "ATDT"; send Phone_Number; send "\r";
  14.       select
  15.          "CONNECT" : next GotIt;
  16.          "BUSY"         : next Dial;
  17.          "NO CARRIER"   : next Dial;
  18.          timeout 22     : display "Dial timeout!"; next Dial;
  19.       end; 
  20.    end; -- Dial
  21.  
  22.    state GotIt
  23.       display "connected";
  24.    end;
  25.  
  26. end;
  27.